function flagValue=isDiagMat(inputMat)
%If flag=1,inputMat is diagonal matrix;else inputMat is not diagonal matrix
[rowNum,colNum]=size(inputMat);
if rowNum==colNum
   [rowMat,colMat]=find(inputMat~=0);
   if isequal(rowMat,colMat)
       flagValue=1;       
   end
else
    flagValue=0;
end